<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>L2LB: Referência ao ficheiro socket.h</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Gerado por Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Página&nbsp;principal</span></a></li>
      <li><a href="annotated.html"><span>Estruturas&nbsp;de&nbsp;dados</span></a></li>
      <li class="current"><a href="files.html"><span>Ficheiros</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Referência ao ficheiro socket.h</h1>Métodos para enviar/receber mensagens via socket. <a href="#_details">Mais...</a>
<p>

<p>
<a href="socket_8h-source.html">Ir para o código fonte deste ficheiro.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Estruturas de Dados</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structksock__thread__t.html">ksock_thread_t</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Thread usada para estabelecer conexões socket.  <a href="structksock__thread__t.html#_details">Mais...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Macros</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_8h.html#a260f09b00594e59211ccbbac88213bf">INADDR_SEND</a>&nbsp;&nbsp;&nbsp;INADDR_LOOPBACK</td></tr>

<tr><td colspan="2"><br><h2>Funções</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_8h.html#c3204901b688e3cb793a9b01c5d19c9a">ksocket_send</a> (struct socket *sock, struct sockaddr_in *addr, unsigned char *buf, int len)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Envia mensagem no socket.  <a href="#c3204901b688e3cb793a9b01c5d19c9a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_8h.html#754ef7ec12b37fc69e125121011fcec8">ksocket_receive</a> (struct socket *sock, struct sockaddr_in *addr, unsigned char *buf, int len)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Recebe mensagem no socket.  <a href="#754ef7ec12b37fc69e125121011fcec8"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Descrição detalhada</h2>
Métodos para enviar/receber mensagens via socket. 
<p>

<p>Definido no ficheiro <a class="el" href="socket_8h-source.html">socket.h</a>.</p>
<hr><h2>Documentação das macros</h2>
<a class="anchor" name="a260f09b00594e59211ccbbac88213bf"></a><!-- doxytag: member="socket.h::INADDR_SEND" ref="a260f09b00594e59211ccbbac88213bf" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define INADDR_SEND&nbsp;&nbsp;&nbsp;INADDR_LOOPBACK          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definido na linha <a class="el" href="socket_8h-source.html#l00009">9</a> do ficheiro <a class="el" href="socket_8h-source.html">socket.h</a>.</p>

<p>Referenciado por <a class="el" href="heartbeat_8h-source.html#l00240">hb_udb_client_start()</a>.</p>

</div>
</div><p>
<hr><h2>Documentação das funções</h2>
<a class="anchor" name="754ef7ec12b37fc69e125121011fcec8"></a><!-- doxytag: member="socket.h::ksocket_receive" ref="754ef7ec12b37fc69e125121011fcec8" args="(struct socket *sock, struct sockaddr_in *addr, unsigned char *buf, int len)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ksocket_receive           </td>
          <td>(</td>
          <td class="paramtype">struct socket *&nbsp;</td>
          <td class="paramname"> <em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct sockaddr_in *&nbsp;</td>
          <td class="paramname"> <em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>len</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Recebe mensagem no socket. 
<p>
<dl compact><dt><b>Parâmetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sock</em>&nbsp;</td><td>Socket </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>addr</em>&nbsp;</td><td>Endereço esperado do remetente </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>Buffer para receber a mensagem </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>Tamanho do buffer </td></tr>
  </table>
</dl>

<p>Definido na linha <a class="el" href="socket_8h-source.html#l00087">87</a> do ficheiro <a class="el" href="socket_8h-source.html">socket.h</a>.</p>

<p>Referenciado por <a class="el" href="heartbeat_8h-source.html#l00168">hb_udb_server_start()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c3204901b688e3cb793a9b01c5d19c9a"></a><!-- doxytag: member="socket.h::ksocket_send" ref="c3204901b688e3cb793a9b01c5d19c9a" args="(struct socket *sock, struct sockaddr_in *addr, unsigned char *buf, int len)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ksocket_send           </td>
          <td>(</td>
          <td class="paramtype">struct socket *&nbsp;</td>
          <td class="paramname"> <em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct sockaddr_in *&nbsp;</td>
          <td class="paramname"> <em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>len</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Envia mensagem no socket. 
<p>
<dl compact><dt><b>Parâmetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sock</em>&nbsp;</td><td>Socket </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>addr</em>&nbsp;</td><td>Endereço do destinatário </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>Buffer com a mensagem </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>Tamanho da mensagem no buffer </td></tr>
  </table>
</dl>

<p>Definido na linha <a class="el" href="socket_8h-source.html#l00049">49</a> do ficheiro <a class="el" href="socket_8h-source.html">socket.h</a>.</p>

<p>Referenciado por <a class="el" href="heartbeat_8h-source.html#l00079">hb_broadcast_msg()</a>.</p>

</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Gerado em Wed Sep 10 23:05:56 2008 para L2LB por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>
